<script setup>
import { ref, reactive, toRaw } from 'vue';
import { service, cache } from '@utils';
import { ElMessage } from 'element-plus';
import Upload from '@components/Upload';

const emit = defineEmits(['refresh']);

const visible = ref(false);
const formRef = ref();
const datePick = ref(null);
const premissionType = ref(false);
const disabledRentDateData = ref();
const state = reactive({
    param: {},
});

const rules = {
    label: [
        { required: true, message: '请输入', trigger: 'blur' },
        // ,{
        //   validator(rule, value, callback, source, options) {
        //     let reg = /^[a-z]+$/
        //     if(!reg.test(value)){
        //         return ['错误']
        //     }
        //     // test if email address already exists in a database
        //     // and add a validation error to the errors array if it does
        //   }}
    ],
    contactName: [{ required: true, message: '请输入', trigger: 'blur' }],
    phone: [
        { required: true, message: '请输入', trigger: 'blur' },
        {
            validator(rule, value, callback, source, options) {
                let reg = /^1[345789]\d{9}$/;
                if (!reg.test(value)) {
                    callback(['请输入正确的手机号']);
                } else {
                    callback();
                }
            },
        },
    ],
    contactAddress: [{ required: true, message: '请输入', trigger: 'blur' }],
    sealNo: [{ required: false, message: '请输入', trigger: 'blur' }],
    orgNumber: [{ required: true, message: '请输入', trigger: 'blur' }],
    payerUser: [{ required: true, message: '请输入', trigger: 'blur' }],
    payerUserName: [{ required: true, message: '请输入', trigger: 'blur' }],
    email: [
        { required: true, message: '请输入', trigger: 'blur' },
        {
            validator(rule, value, callback, source, options) {
                let reg = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/;
                if (!reg.test(value)) {
                    callback(['请输入正确的邮箱']);
                } else {
                    callback();
                }
            },
        },
    ],
    card: [
        { required: true, message: '请输入', trigger: 'blur' },
        {
            validator(rule, value, callback, source, options) {
                let card18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
                let card15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$/;
                if (value && value.length == 18) {
                    if (!card18.test(value)) {
                        callback(['请输入正确的身份证号码']);
                    } else {
                        callback();
                    }
                } else {
                    if (!card15.test(value)) {
                        callback(['请输入正确的身份证号码']);
                    } else {
                        callback();
                    }
                }
            },
        },
    ],
    certificationMethod: [{ required: true, message: '请输入', trigger: 'blur' }],
    cooperationTime: [{ required: true, message: '请输入', trigger: 'blur' }],
    joinTime: [{ required: true, message: '请输入', trigger: 'blur' }],
    joinStartTime: [{ required: true, message: '请输入', trigger: 'blur' }],
    joinEndTime: [{ required: true, message: '请输入', trigger: 'blur' }],
    joinMoney: [{ required: true, message: '请输入', trigger: 'blur' }],
    securityDeposit: [{ required: true, message: '请输入', trigger: 'blur' }],
    enterpriseType: [{ required: true, message: '请选择', trigger: 'change' }],
    businessProduct: [{ required: true, message: '请输入', trigger: 'blur' }],
    customerPhone: [{ required: true, message: '请输入', trigger: 'blur' }],
    businessScope: [{ required: true, message: '请输入', trigger: 'blur' }],
    businessPic: [{ required: true, message: '请输入', trigger: 'blur' }],
    sealUrl: [{ required: true, message: '请选择', trigger: 'blur' }],
    cardPic: [{ required: true, message: '请选择', trigger: 'blur' }],
    taxSpecies: [{ required: true, message: '请输入', trigger: 'blur' }],
    ticketInvoice: [{ required: true, message: '请输入', trigger: 'blur' }],
    ticketPhone: [{ required: true, message: '请输入', trigger: 'blur' }],
    taxIdentificationNumber: [{ required: true, message: '请输入', trigger: 'blur' }],
    taxStartTime: [{ required: true, message: '请输入', trigger: 'blur' }],
    bankAccount: [{ required: true, message: '请输入', trigger: 'blur' }],
    bankAccountName: [{ required: true, message: '请输入', trigger: 'blur' }],
    ticketAddress: [{ required: true, message: '请输入', trigger: 'blur' }],
    addressUserName: [{ required: true, message: '请输入', trigger: 'blur' }],
    addressUserPhone: [{ required: true, message: '请输入', trigger: 'blur' }],
    addressUserAddress: [{ required: true, message: '请输入', trigger: 'blur' }],
    cardName: [{ required: true, message: '请输入', trigger: 'blur' }],
    cardPhone: [
        { required: true, message: '请输入', trigger: 'blur' },
        {
            validator(rule, value, callback, source, options) {
                let reg = /^1[345789]\d{9}$/;
                if (!reg.test(value)) {
                    callback(['请输入正确的手机号']);
                } else {
                    callback();
                }
            },
        },
    ],
    firstProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    fourProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    sevenProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    tenProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    twoProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    fiveProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    eightProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    elevenProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    threeProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    sixProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    nineProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
    twelveProfitRate: [{ required: true, message: '请输入', trigger: 'blur' }],
};

const open = async (item, type, disabledRentDate) => {
    if (item.companyId) {
        getData(item.companyId);
    }
    premissionType.value = type;
    disabledRentDateData.value = disabledRentDate;
    getSettingData();
    visible.value = true;
};
const getSettingData = () => {
    disabledRentDateData.value.forEach(item => {
        rules['profitRate' + item.day] = [{ required: true, message: '请输入', trigger: 'blur' }];
        switch (item.day * 1) {
            case 30:
                item.rentTitle = '单期';
                break;
            case 60:
                item.rentTitle = '两期';
                break;
            case 90:
                item.rentTitle = '三期';
                break;
            case 120:
                item.rentTitle = '四期';
                break;
            case 150:
                item.rentTitle = '五期';
                break;
            case 180:
                item.rentTitle = '六期';
                break;
            case 210:
                item.rentTitle = '七期';
                break;
            case 240:
                item.rentTitle = '八期';
                break;
            case 270:
                item.rentTitle = '九期';
                break;
            case 300:
                item.rentTitle = '十期';
                break;
            case 330:
                item.rentTitle = '十一期';
                break;
            default:
                item.rentTitle = '十二期';
                break;
        }
    });
};
const getData = async companyId => {
    let res = await service.auth.companyDetail(companyId);
    state.param = res.data;
    if (res.data.joinStartTime) {
        state.param.joinTime = [];
        state.param.joinTime.push(res.data.joinStartTime);
        state.param.joinTime.push(res.data.joinEndTime);
    }
};
const close = () => {
    visible.value = false;
    state.param = {};
};

const sure = async () => {
    formRef.value.validate(valid => {
        if (valid) {
            realSubmit();
        } else {
            ElMessage.warning('请检查必填项');
        }
    });
};
const realSubmit = async () => {
    delete state.param.joinTime;
    // state.param.taxStartTime = state.param.taxStartTime + ' 00:00:00'
    let res;
    if (state.param.companyId) {
        res = await service.auth.companyEdit(toRaw(state.param));
    } else {
        res = await service.auth.companySave(toRaw(state.param));
    }
    if (res) {
        !!state.param.companyId ? ElMessage.success('修改成功') : ElMessage.success('新增成功');
        close();
        emit('refresh', !!state.param.companyId);
    }
};
const handleOpenDate = () => {
    datePick.value.handleOpen();
};
const visChange = date => {
    if (date) {
        state.param.joinStartTime = date[0];
        state.param.joinEndTime = date[1];
    }
};
//把方法暴露给父组件
defineExpose({
    open,
});
</script>

<template>
    <div class="dialogDiv">
        <!-- custom-class="dialogDiv" -->
        <el-dialog v-model="visible" :title="!state.param.companyId ? '添加' : premissionType ? '详情' : '修改'" center :close-on-click-modal="false" @close="close" destroy-on-close width="90%" top="5vh" :fullscreen="true" :lock-scroll="true">
            <section class="dialogBody">
                <el-form :model="state.param" :rules="rules" :disabled="premissionType" ref="formRef" label-width="160px" label-suffix=":" onsubmit="return false;">
                    <el-row class="titleText">
                        <span>企业信息</span>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="商户名称" prop="label">
                                <el-input v-model="state.param.label" placeholder="请输入商户名称" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="联系人" prop="contactName">
                                <el-input v-model="state.param.contactName" placeholder="请输入联系人" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="联系人手机号" prop="phone">
                                <el-input type="number" v-model="state.param.phone" placeholder="请输入联系人手机号" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <!-- </el-row>
                <el-row> -->
                        <el-col :span="8">
                            <el-form-item label="认证类型" prop="certificationMethod">
                                <el-select v-model="state.param.certificationMethod" placeholder="请选择认证类型" style="width: 100%">
                                    <el-option label="企业" :value="0" />
                                    <el-option label="个体商户" :value="1" />
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="邮箱" prop="email">
                                <el-input v-model="state.param.email" placeholder="请输入邮箱" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="印章编号" prop="sealNo">
                                <el-input v-model="state.param.sealNo" placeholder="请输入印章编号" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="合作类型" prop="enterpriseType">
                                <el-select v-model="state.param.enterpriseType" placeholder="请选择合作类型" style="width: 100%">
                                    <el-option label="商户" :value="0" />
                                    <el-option label="平台" :value="1" />
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="主营产品" prop="businessProduct">
                                <el-input v-model="state.param.businessProduct" placeholder="请输入主营产品" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="客服电话" prop="customerPhone">
                                <el-input v-model="state.param.customerPhone" placeholder="请输入客服电话" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="加盟起止时间" prop="joinTime">
                                <el-date-picker value-format="YYYY-MM-DD" v-model="state.param.joinTime" type="daterange" placeholder="请选择加盟生效时间" @change="visChange" style="width: 100%" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="合作期限" prop="cooperationTime">
                                <el-input type="number" v-model="state.param.cooperationTime" placeholder="请输入合作期限" clearable>
                                    <template #append>月</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="实际加盟费" prop="joinMoney">
                                <el-input type="number" v-model="state.param.joinMoney" placeholder="请输入实际加盟费" clearable>
                                    <template #append>元</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="保证金" prop="securityDeposit">
                                <el-input type="number" v-model="state.param.securityDeposit" placeholder="请输入保证金" clearable>
                                    <template #append>元</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="支付宝账户" prop="payerUser">
                                <el-input v-model="state.param.payerUser" placeholder="请输入支付宝账户" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="支付宝姓名" prop="payerUserName">
                                <el-input v-model="state.param.payerUserName" placeholder="请输入支付宝姓名" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="营业经营地址" prop="contactAddress">
                                <el-input v-model="state.param.contactAddress" placeholder="请输入营业经营地址" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="营业执照经营范围" prop="businessScope">
                                <el-input v-model="state.param.businessScope" placeholder="请输入营业执照经营范围" clearable></el-input>
                            </el-form-item>
                        </el-col>

                        <!-- </el-row>
                <el-row> -->

                        <!-- </el-row> -->
                        <!-- <el-row> -->

                        <!-- </el-row>
                <el-row> -->

                        <!-- <el-col :span="8">
                            <el-form-item label="加盟结束时间" prop="joinEndTime">
                                <el-date-picker v-model="state.param.joinEndTime" type="date" placeholder="请选择加盟生效时间" style="width: 100%"></el-date-picker>
                            </el-form-item>
                        </el-col> -->

                        <!-- </el-row>
                <el-row> -->

                        <!-- </el-row>
                <el-row> -->

                        <el-col></el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="营业执照照片" prop="businessPic">
                                <upload class="businessPic" v-model="state.param.businessPic" :disabled="premissionType" show-tip :limit="1" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="统一社会信用代码" prop="orgNumber">
                                <el-input v-model="state.param.orgNumber" placeholder="请输入统一社会信用代码" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="商户logo">
                                <upload class="logo limit1" v-model="state.param.logo" :disabled="premissionType" show-tip :limit="1" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="公章图片" prop="sealUrl">
                                <upload class="sealUrl limit1" v-model="state.param.sealUrl" :disabled="premissionType" show-tip :limit="1" />
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="法人身份证照片" prop="cardPic">
                                <upload class="cardPic limit2" v-model="state.param.cardPic" :disabled="premissionType" show-tip :limit="2" />
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="法人姓名" prop="cardName">
                                <el-input v-model="state.param.cardName" placeholder="请输入法人姓名" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="法人身份证号" prop="card">
                                <el-input v-model="state.param.card" placeholder="请输入法人身份证号" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="法人手机号" prop="cardPhone">
                                <el-input v-model="state.param.cardPhone" placeholder="请输入法人手机号" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row class="titleText">
                        <span>抽佣方式</span>
                    </el-row>
                    <el-row>
                        <template v-for="item in disabledRentDateData">
                            <el-col :span="6" v-if="item.status != 0">
                                <el-form-item :label="`租期${item.rentTitle}平台分成`" :prop="'profitRate' + item.day">
                                    <el-input-number v-model="state.param['profitRate' + item.day]" :placeholder="`请输入${item.rentTitle}平台分成`" :max="100" :min="0" clearable :controls="false"></el-input-number>
                                </el-form-item>
                            </el-col>
                        </template>
                        <!-- <el-col :span="6" v-if="disabledRentDateData[1].status != 0">
                            <el-form-item label="租期二期平台分成" prop="twoProfitRate">
                                <el-input-number
                                    v-model="state.param.twoProfitRate"
                                    placeholder="请输入二期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[2].status != 0">
                            <el-form-item label="租期三期平台分成" prop="threeProfitRate">
                                <el-input-number
                                    v-model="state.param.threeProfitRate"
                                    placeholder="请输入三期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[3].status != 0">
                            <el-form-item label="租期四期平台分成" prop="fourProfitRate">
                                <el-input-number
                                    v-model="state.param.fourProfitRate"
                                    placeholder="请输入四期平台分成"
                                    type="number"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[4].status != 0">
                            <el-form-item label="租期五期平台分成" prop="fiveProfitRate">
                                <el-input-number
                                    v-model="state.param.fiveProfitRate"
                                    placeholder="请输入五期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[5].status != 0">
                            <el-form-item label="租期六期平台分成" prop="sixProfitRate">
                                <el-input-number
                                    v-model="state.param.sixProfitRate"
                                    placeholder="请输入六期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[6].status != 0">
                            <el-form-item label="租期七期平台分成" prop="sevenProfitRate">
                                <el-input-number
                                    v-model="state.param.sevenProfitRate"
                                    placeholder="请输入七期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[7].status != 0">
                            <el-form-item label="租期八期平台分成" prop="eightProfitRate">
                                <el-input-number
                                    v-model="state.param.eightProfitRate"
                                    placeholder="请输入八期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[8].status != 0">
                            <el-form-item label="租期九期平台分成" prop="nineProfitRate">
                                <el-input-number
                                    v-model="state.param.nineProfitRate"
                                    placeholder="请输入九期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[9].status != 0">
                            <el-form-item label="租期十期平台分成" prop="tenProfitRate">
                                <el-input-number
                                    v-model="state.param.tenProfitRate"
                                    placeholder="请输入十期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[10].status != 0">
                            <el-form-item label="租期十一期平台分成" prop="elevenProfitRate">
                                <el-input-number
                                    v-model="state.param.elevenProfitRate"
                                    placeholder="请输入十一期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6" v-if="disabledRentDateData[11].status != 0">
                            <el-form-item label="租期十二期平台分成" prop="twelveProfitRate">
                                <el-input-number
                                    v-model="state.param.twelveProfitRate"
                                    placeholder="请输入十二期平台分成"
                                    :max="100"
                                    :min="0"
                                    clearable
                                    :controls="false"
                                ></el-input-number>
                            </el-form-item>
                        </el-col> -->
                    </el-row>
                    <el-row class="titleText">
                        <span>开票信息</span>
                    </el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="纳税人资格种类" prop="taxSpecies">
                                <el-radio-group v-model="state.param.taxSpecies">
                                    <el-radio :label="0">一般纳税人（一般纳税人开的是专票）</el-radio>
                                    <el-radio :label="1">小规模纳税人</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="发票抬头" prop="ticketInvoice">
                                <el-input v-model="state.param.ticketInvoice" placeholder="请输入发票抬头" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="发票电话" prop="ticketPhone">
                                <el-input v-model="state.param.ticketPhone" placeholder="请输入发票电话" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="纳税人识别号" prop="taxIdentificationNumber">
                                <el-input v-model="state.param.taxIdentificationNumber" placeholder="请输入纳税人识别号" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8" id="datePick">
                            <el-form-item label="纳税人资格开始时间" prop="taxStartTime">
                                <el-date-picker ref="datePick" value-format="YYYY-MM-DD" @focus="handleOpenDate" style="width: 100%" v-model="state.param.taxStartTime" type="date" placeholder="请输入纳税人资格开始时间" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="银行账号" prop="bankAccount">
                                <el-input v-model="state.param.bankAccount" placeholder="请输入银行账号" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="开户行名称" prop="bankAccountName">
                                <el-input v-model="state.param.bankAccountName" placeholder="请输入开户行名称" clearable></el-input>
                            </el-form-item>
                        </el-col>

                        <el-col :span="8">
                            <el-form-item label="收件人名称" prop="addressUserName">
                                <el-input v-model="state.param.addressUserName" placeholder="请输入收件人名称" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="寄送电话" prop="addressUserPhone">
                                <el-input v-model="state.param.addressUserPhone" placeholder="请输入寄送电话" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="16">
                            <el-form-item label="开票地址" prop="ticketAddress">
                                <el-input v-model="state.param.ticketAddress" placeholder="请输入开票地址" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="16">
                            <el-form-item label="收件人地址" prop="addressUserAddress">
                                <el-input v-model="state.param.addressUserAddress" placeholder="请输入收件人地址" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <!-- <el-form-item l-form-item label="联系人" prop="contactName">
                    <el-input v-model="state.param.contactName" placeholder="请输入联系人" clearable></el-input>
                </el-form-item>
                <el-form-item label="手机号" prop="phone">
                    <el-input type="number" v-model="state.param.phone" placeholder="请输入手机号" clearable></el-input>
                </el-form-item>
                <el-form-item label="联系地址" prop="contactAddress">
                    <el-input v-model="state.param.contactAddress" placeholder="请输入联系地址" clearable></el-input>
                </el-form-item>
                <el-form-item label="印章编号" prop="sealNo">
                    <el-input v-model="state.param.sealNo" placeholder="请输入联系地址" clearable></el-input>
                </el-form-item>
                <el-form-item label="统一社会信用代码" prop="orgNumber">
                    <el-input v-model="state.param.orgNumber" placeholder="请输入统一社会信用代码" clearable></el-input>
                </el-form-item> -->
                </el-form>
            </section>

            <template #footer>
                <span class="flex-align-end">
                    <div class="margin-right20">
                        <el-button @click="close">取消</el-button>
                    </div>
                    <el-button type="primary" @click="sure">确定</el-button>
                </span>
            </template>
        </el-dialog>
    </div>
</template>
<style lang="scss" scoped>
.dialogDiv ::v-deep(.el-dialog__body) {
    height: 80% !important;
    overflow: auto !important;
}

.dialogDiv ::v-deep(.el-dialog--center) {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.titleText {
    font-size: 20px;
    font-weight: 500;
    margin: 10px 0;
    margin-bottom: 15px;
}

.titleText > span {
    display: inline-block;
    padding-left: 20px;
    border-left: 5px solid rgb(0, 195, 255);
    line-height: 20px;
}

#datePick :deep(.el-input__wrapper) {
    display: flex;
}

:deep(.businessPic > ul > div:nth-child(2)) {
    display: none;
}

:deep(.limit2 > ul > div:nth-child(3)) {
    display: none;
}

:deep(.limit1 > ul > div:nth-child(2)) {
    display: none;
}
</style>
